load("//bazel:tachyon_cc.bzl", "tachyon_cc_library", "tachyon_cc_unittest")

package(default_visibility = ["//visibility:public"])

tachyon_cc_library(
    name = "batch_commitment_state",
    hdrs = ["batch_commitment_state.h"],
    deps = ["//tachyon:export"],
)

tachyon_cc_library(
    name = "mixed_matrix_commitment_scheme",
    hdrs = ["mixed_matrix_commitment_scheme.h"],
    deps = [
        ":mixed_matrix_commitment_scheme_traits_forward",
        "//tachyon/base:openmp_util",
        "//tachyon/base/containers:container_util",
        "//tachyon/math/geometry:dimensions",
        "//tachyon/math/matrix:matrix_types",
        "@com_google_absl//absl/types:span",
    ],
)

tachyon_cc_library(
    name = "mixed_matrix_commitment_scheme_traits_forward",
    hdrs = ["mixed_matrix_commitment_scheme_traits_forward.h"],
)

tachyon_cc_library(
    name = "polynomial_openings",
    hdrs = ["polynomial_openings.h"],
    deps = [
        "//tachyon/base:logging",
        "//tachyon/base:openmp_util",
        "//tachyon/base:optional",
        "//tachyon/base:ref",
        "//tachyon/base/containers:container_util",
        "//tachyon/math/polynomials/univariate:lagrange_interpolation",
        "//tachyon/math/polynomials/univariate:univariate_polynomial",
        "@com_google_absl//absl/container:btree",
        "@com_google_absl//absl/strings",
    ],
)

tachyon_cc_library(
    name = "univariate_polynomial_commitment_scheme",
    hdrs = ["univariate_polynomial_commitment_scheme.h"],
    deps = [
        ":vector_commitment_scheme",
        "//tachyon/math/polynomials/univariate:univariate_evaluations",
        "//tachyon/math/polynomials/univariate:univariate_polynomial",
    ],
)

tachyon_cc_library(
    name = "vector_commitment_scheme",
    hdrs = ["vector_commitment_scheme.h"],
    deps = [
        ":batch_commitment_state",
        ":vector_commitment_scheme_traits_forward",
        "//tachyon/base:bits",
    ],
)

tachyon_cc_library(
    name = "vector_commitment_scheme_traits_forward",
    hdrs = ["vector_commitment_scheme_traits_forward.h"],
)

tachyon_cc_unittest(
    name = "commitments_unittests",
    srcs = ["polynomial_openings_unittest.cc"],
    deps = [
        ":polynomial_openings",
        "//tachyon/base/containers:contains",
        "//tachyon/math/finite_fields/test:finite_field_test",
        "//tachyon/math/finite_fields/test:gf7",
        "//tachyon/math/polynomials/univariate:univariate_polynomial",
    ],
)
